//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.alibaba.nacos.consistency.entity;

import com.google.protobuf.AbstractParser;
import com.google.protobuf.ByteString;
import com.google.protobuf.CodedInputStream;
import com.google.protobuf.CodedOutputStream;
import com.google.protobuf.Descriptors;
import com.google.protobuf.ExtensionRegistryLite;
import com.google.protobuf.GeneratedMessageV3;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.MapEntry;
import com.google.protobuf.MapField;
import com.google.protobuf.Message;
import com.google.protobuf.Parser;
import com.google.protobuf.UnknownFieldSet;
import com.google.protobuf.WireFormat.FieldType;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.Iterator;
import java.util.Map;

public final class Log extends GeneratedMessageV3 implements LogOrBuilder {
    private static final long serialVersionUID = 0L;
    public static final int GROUP_FIELD_NUMBER = 1;
    private volatile Object group_;
    public static final int KEY_FIELD_NUMBER = 2;
    private volatile Object key_;
    public static final int DATA_FIELD_NUMBER = 3;
    private ByteString data_;
    public static final int TYPE_FIELD_NUMBER = 4;
    private volatile Object type_;
    public static final int OPERATION_FIELD_NUMBER = 5;
    private volatile Object operation_;
    public static final int EXTENDINFO_FIELD_NUMBER = 6;
    private MapField<String, String> extendInfo_;
    private byte memoizedIsInitialized;
    private static final Log DEFAULT_INSTANCE = new Log();
    private static final Parser<Log> PARSER = new AbstractParser<Log>() {
        public Log parsePartialFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
            return new Log(input, extensionRegistry);
        }
    };

    private Log(GeneratedMessageV3.Builder<?> builder) {
        super(builder);
        this.memoizedIsInitialized = -1;
    }

    private Log() {
        this.memoizedIsInitialized = -1;
        this.group_ = "";
        this.key_ = "";
        this.data_ = ByteString.EMPTY;
        this.type_ = "";
        this.operation_ = "";
    }

    protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) {
        return new Log();
    }

    public final UnknownFieldSet getUnknownFields() {
        return this.unknownFields;
    }

    private Log(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
            throw new NullPointerException();
        } else {
            boolean mutable_bitField0_ = false;
            UnknownFieldSet.Builder unknownFields = UnknownFieldSet.newBuilder();

            try {
                boolean done = false;

                while(!done) {
                    int tag = input.readTag();
                    String s;
                    switch (tag) {
                        case 0:
                            done = true;
                            break;
                        case 10:
                            s = input.readStringRequireUtf8();
                            this.group_ = s;
                            break;
                        case 18:
                            s = input.readStringRequireUtf8();
                            this.key_ = s;
                            break;
                        case 26:
                            this.data_ = input.readBytes();
                            break;
                        case 34:
                            s = input.readStringRequireUtf8();
                            this.type_ = s;
                            break;
                        case 42:
                            s = input.readStringRequireUtf8();
                            this.operation_ = s;
                            break;
                        case 50:
                            if (!(mutable_bitField0_ & true)) {
                                this.extendInfo_ = MapField.newMapField(Log.ExtendInfoDefaultEntryHolder.defaultEntry);
                                mutable_bitField0_ |= true;
                            }

                            MapEntry<String, String> extendInfo__ = (MapEntry)input.readMessage(Log.ExtendInfoDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
                            this.extendInfo_.getMutableMap().put(extendInfo__.getKey(), extendInfo__.getValue());
                            break;
                        default:
                            if (!this.parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                                done = true;
                            }
                    }
                }
            } catch (InvalidProtocolBufferException var12) {
                throw var12.setUnfinishedMessage(this);
            } catch (IOException var13) {
                throw (new InvalidProtocolBufferException(var13)).setUnfinishedMessage(this);
            } finally {
                this.unknownFields = unknownFields.build();
                this.makeExtensionsImmutable();
            }

        }
    }

    public static final Descriptors.Descriptor getDescriptor() {
        return Data.internal_static_Log_descriptor;
    }

    protected MapField internalGetMapField(int number) {
        switch (number) {
            case 6:
                return this.internalGetExtendInfo();
            default:
                throw new RuntimeException("Invalid map field number: " + number);
        }
    }

    protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
        return Data.internal_static_Log_fieldAccessorTable.ensureFieldAccessorsInitialized(Log.class, Builder.class);
    }

    public String getGroup() {
        Object ref = this.group_;
        if (ref instanceof String) {
            return (String)ref;
        } else {
            ByteString bs = (ByteString)ref;
            String s = bs.toStringUtf8();
            this.group_ = s;
            return s;
        }
    }

    public ByteString getGroupBytes() {
        Object ref = this.group_;
        if (ref instanceof String) {
            ByteString b = ByteString.copyFromUtf8((String)ref);
            this.group_ = b;
            return b;
        } else {
            return (ByteString)ref;
        }
    }

    public String getKey() {
        Object ref = this.key_;
        if (ref instanceof String) {
            return (String)ref;
        } else {
            ByteString bs = (ByteString)ref;
            String s = bs.toStringUtf8();
            this.key_ = s;
            return s;
        }
    }

    public ByteString getKeyBytes() {
        Object ref = this.key_;
        if (ref instanceof String) {
            ByteString b = ByteString.copyFromUtf8((String)ref);
            this.key_ = b;
            return b;
        } else {
            return (ByteString)ref;
        }
    }

    public ByteString getData() {
        return this.data_;
    }

    public String getType() {
        Object ref = this.type_;
        if (ref instanceof String) {
            return (String)ref;
        } else {
            ByteString bs = (ByteString)ref;
            String s = bs.toStringUtf8();
            this.type_ = s;
            return s;
        }
    }

    public ByteString getTypeBytes() {
        Object ref = this.type_;
        if (ref instanceof String) {
            ByteString b = ByteString.copyFromUtf8((String)ref);
            this.type_ = b;
            return b;
        } else {
            return (ByteString)ref;
        }
    }

    public String getOperation() {
        Object ref = this.operation_;
        if (ref instanceof String) {
            return (String)ref;
        } else {
            ByteString bs = (ByteString)ref;
            String s = bs.toStringUtf8();
            this.operation_ = s;
            return s;
        }
    }

    public ByteString getOperationBytes() {
        Object ref = this.operation_;
        if (ref instanceof String) {
            ByteString b = ByteString.copyFromUtf8((String)ref);
            this.operation_ = b;
            return b;
        } else {
            return (ByteString)ref;
        }
    }

    private MapField<String, String> internalGetExtendInfo() {
        return this.extendInfo_ == null ? MapField.emptyMapField(Log.ExtendInfoDefaultEntryHolder.defaultEntry) : this.extendInfo_;
    }

    public int getExtendInfoCount() {
        return this.internalGetExtendInfo().getMap().size();
    }

    public boolean containsExtendInfo(String key) {
        if (key == null) {
            throw new NullPointerException();
        } else {
            return this.internalGetExtendInfo().getMap().containsKey(key);
        }
    }

    /** @deprecated */
    @Deprecated
    public Map<String, String> getExtendInfo() {
        return this.getExtendInfoMap();
    }

    public Map<String, String> getExtendInfoMap() {
        return this.internalGetExtendInfo().getMap();
    }

    public String getExtendInfoOrDefault(String key, String defaultValue) {
        if (key == null) {
            throw new NullPointerException();
        } else {
            Map<String, String> map = this.internalGetExtendInfo().getMap();
            return map.containsKey(key) ? (String)map.get(key) : defaultValue;
        }
    }

    public String getExtendInfoOrThrow(String key) {
        if (key == null) {
            throw new NullPointerException();
        } else {
            Map<String, String> map = this.internalGetExtendInfo().getMap();
            if (!map.containsKey(key)) {
                throw new IllegalArgumentException();
            } else {
                return (String)map.get(key);
            }
        }
    }

    public final boolean isInitialized() {
        byte isInitialized = this.memoizedIsInitialized;
        if (isInitialized == 1) {
            return true;
        } else if (isInitialized == 0) {
            return false;
        } else {
            this.memoizedIsInitialized = 1;
            return true;
        }
    }

    public void writeTo(CodedOutputStream output) throws IOException {
        if (!this.getGroupBytes().isEmpty()) {
            GeneratedMessageV3.writeString(output, 1, this.group_);
        }

        if (!this.getKeyBytes().isEmpty()) {
            GeneratedMessageV3.writeString(output, 2, this.key_);
        }

        if (!this.data_.isEmpty()) {
            output.writeBytes(3, this.data_);
        }

        if (!this.getTypeBytes().isEmpty()) {
            GeneratedMessageV3.writeString(output, 4, this.type_);
        }

        if (!this.getOperationBytes().isEmpty()) {
            GeneratedMessageV3.writeString(output, 5, this.operation_);
        }

        GeneratedMessageV3.serializeStringMapTo(output, this.internalGetExtendInfo(), Log.ExtendInfoDefaultEntryHolder.defaultEntry, 6);
        this.unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
        int size = this.memoizedSize;
        if (size != -1) {
            return size;
        } else {
            size = 0;
            if (!this.getGroupBytes().isEmpty()) {
                size += GeneratedMessageV3.computeStringSize(1, this.group_);
            }

            if (!this.getKeyBytes().isEmpty()) {
                size += GeneratedMessageV3.computeStringSize(2, this.key_);
            }

            if (!this.data_.isEmpty()) {
                size += CodedOutputStream.computeBytesSize(3, this.data_);
            }

            if (!this.getTypeBytes().isEmpty()) {
                size += GeneratedMessageV3.computeStringSize(4, this.type_);
            }

            if (!this.getOperationBytes().isEmpty()) {
                size += GeneratedMessageV3.computeStringSize(5, this.operation_);
            }

            MapEntry extendInfo__;
            for(Iterator var2 = this.internalGetExtendInfo().getMap().entrySet().iterator(); var2.hasNext(); size += CodedOutputStream.computeMessageSize(6, extendInfo__)) {
                Map.Entry<String, String> entry = (Map.Entry)var2.next();
                extendInfo__ = Log.ExtendInfoDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build();
            }

            size += this.unknownFields.getSerializedSize();
            this.memoizedSize = size;
            return size;
        }
    }

    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        } else if (!(obj instanceof Log)) {
            return super.equals(obj);
        } else {
            Log other = (Log)obj;
            if (!this.getGroup().equals(other.getGroup())) {
                return false;
            } else if (!this.getKey().equals(other.getKey())) {
                return false;
            } else if (!this.getData().equals(other.getData())) {
                return false;
            } else if (!this.getType().equals(other.getType())) {
                return false;
            } else if (!this.getOperation().equals(other.getOperation())) {
                return false;
            } else if (!this.internalGetExtendInfo().equals(other.internalGetExtendInfo())) {
                return false;
            } else {
                return this.unknownFields.equals(other.unknownFields);
            }
        }
    }

    public int hashCode() {
        if (this.memoizedHashCode != 0) {
            return this.memoizedHashCode;
        } else {
            int hash = 41;
            hash = 19 * hash + getDescriptor().hashCode();
            hash = 37 * hash + 1;
            hash = 53 * hash + this.getGroup().hashCode();
            hash = 37 * hash + 2;
            hash = 53 * hash + this.getKey().hashCode();
            hash = 37 * hash + 3;
            hash = 53 * hash + this.getData().hashCode();
            hash = 37 * hash + 4;
            hash = 53 * hash + this.getType().hashCode();
            hash = 37 * hash + 5;
            hash = 53 * hash + this.getOperation().hashCode();
            if (!this.internalGetExtendInfo().getMap().isEmpty()) {
                hash = 37 * hash + 6;
                hash = 53 * hash + this.internalGetExtendInfo().hashCode();
            }

            hash = 29 * hash + this.unknownFields.hashCode();
            this.memoizedHashCode = hash;
            return hash;
        }
    }

    public static Log parseFrom(ByteBuffer data) throws InvalidProtocolBufferException {
        return (Log)PARSER.parseFrom(data);
    }

    public static Log parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        return (Log)PARSER.parseFrom(data, extensionRegistry);
    }

    public static Log parseFrom(ByteString data) throws InvalidProtocolBufferException {
        return (Log)PARSER.parseFrom(data);
    }

    public static Log parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        return (Log)PARSER.parseFrom(data, extensionRegistry);
    }

    public static Log parseFrom(byte[] data) throws InvalidProtocolBufferException {
        return (Log)PARSER.parseFrom(data);
    }

    public static Log parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
        return (Log)PARSER.parseFrom(data, extensionRegistry);
    }

    public static Log parseFrom(InputStream input) throws IOException {
        return (Log)GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static Log parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
        return (Log)GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static Log parseDelimitedFrom(InputStream input) throws IOException {
        return (Log)GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static Log parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
        return (Log)GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }

    public static Log parseFrom(CodedInputStream input) throws IOException {
        return (Log)GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static Log parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
        return (Log)GeneratedMessageV3.parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() {
        return newBuilder();
    }

    public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(Log prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    public Builder toBuilder() {
        return this == DEFAULT_INSTANCE ? new Builder() : (new Builder()).mergeFrom(this);
    }

    protected Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent) {
        Builder builder = new Builder(parent);
        return builder;
    }

    public static Log getDefaultInstance() {
        return DEFAULT_INSTANCE;
    }

    public static Parser<Log> parser() {
        return PARSER;
    }

    public Parser<Log> getParserForType() {
        return PARSER;
    }

    public Log getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
    }

    public static final class Builder extends GeneratedMessageV3.Builder<Builder> implements LogOrBuilder {
        private int bitField0_;
        private Object group_;
        private Object key_;
        private ByteString data_;
        private Object type_;
        private Object operation_;
        private MapField<String, String> extendInfo_;

        public static final Descriptors.Descriptor getDescriptor() {
            return Data.internal_static_Log_descriptor;
        }

        protected MapField internalGetMapField(int number) {
            switch (number) {
                case 6:
                    return this.internalGetExtendInfo();
                default:
                    throw new RuntimeException("Invalid map field number: " + number);
            }
        }

        protected MapField internalGetMutableMapField(int number) {
            switch (number) {
                case 6:
                    return this.internalGetMutableExtendInfo();
                default:
                    throw new RuntimeException("Invalid map field number: " + number);
            }
        }

        protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() {
            return Data.internal_static_Log_fieldAccessorTable.ensureFieldAccessorsInitialized(Log.class, Builder.class);
        }

        private Builder() {
            this.group_ = "";
            this.key_ = "";
            this.data_ = ByteString.EMPTY;
            this.type_ = "";
            this.operation_ = "";
            this.maybeForceBuilderInitialization();
        }

        private Builder(GeneratedMessageV3.BuilderParent parent) {
            super(parent);
            this.group_ = "";
            this.key_ = "";
            this.data_ = ByteString.EMPTY;
            this.type_ = "";
            this.operation_ = "";
            this.maybeForceBuilderInitialization();
        }

        private void maybeForceBuilderInitialization() {
            if (Log.alwaysUseFieldBuilders) {
            }

        }

        public Builder clear() {
            super.clear();
            this.group_ = "";
            this.key_ = "";
            this.data_ = ByteString.EMPTY;
            this.type_ = "";
            this.operation_ = "";
            this.internalGetMutableExtendInfo().clear();
            return this;
        }

        public Descriptors.Descriptor getDescriptorForType() {
            return Data.internal_static_Log_descriptor;
        }

        public Log getDefaultInstanceForType() {
            return Log.getDefaultInstance();
        }

        public Log build() {
            Log result = this.buildPartial();
            if (!result.isInitialized()) {
                throw newUninitializedMessageException(result);
            } else {
                return result;
            }
        }

        public Log buildPartial() {
            Log result = new Log(this);
            int from_bitField0_ = this.bitField0_;
            result.group_ = this.group_;
            result.key_ = this.key_;
            result.data_ = this.data_;
            result.type_ = this.type_;
            result.operation_ = this.operation_;
            result.extendInfo_ = this.internalGetExtendInfo();
            result.extendInfo_.makeImmutable();
            this.onBuilt();
            return result;
        }

        public Builder clone() {
            return (Builder)super.clone();
        }

        public Builder setField(Descriptors.FieldDescriptor field, Object value) {
            return (Builder)super.setField(field, value);
        }

        public Builder clearField(Descriptors.FieldDescriptor field) {
            return (Builder)super.clearField(field);
        }

        public Builder clearOneof(Descriptors.OneofDescriptor oneof) {
            return (Builder)super.clearOneof(oneof);
        }

        public Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) {
            return (Builder)super.setRepeatedField(field, index, value);
        }

        public Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value) {
            return (Builder)super.addRepeatedField(field, value);
        }

        public Builder mergeFrom(Message other) {
            if (other instanceof Log) {
                return this.mergeFrom((Log)other);
            } else {
                super.mergeFrom(other);
                return this;
            }
        }

        public Builder mergeFrom(Log other) {
            if (other == Log.getDefaultInstance()) {
                return this;
            } else {
                if (!other.getGroup().isEmpty()) {
                    this.group_ = other.group_;
                    this.onChanged();
                }

                if (!other.getKey().isEmpty()) {
                    this.key_ = other.key_;
                    this.onChanged();
                }

                if (other.getData() != ByteString.EMPTY) {
                    this.setData(other.getData());
                }

                if (!other.getType().isEmpty()) {
                    this.type_ = other.type_;
                    this.onChanged();
                }

                if (!other.getOperation().isEmpty()) {
                    this.operation_ = other.operation_;
                    this.onChanged();
                }

                this.internalGetMutableExtendInfo().mergeFrom(other.internalGetExtendInfo());
                this.mergeUnknownFields(other.unknownFields);
                this.onChanged();
                return this;
            }
        }

        public final boolean isInitialized() {
            return true;
        }

        public Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
            Log parsedMessage = null;

            try {
                parsedMessage = (Log)Log.PARSER.parsePartialFrom(input, extensionRegistry);
            } catch (InvalidProtocolBufferException var8) {
                parsedMessage = (Log)var8.getUnfinishedMessage();
                throw var8.unwrapIOException();
            } finally {
                if (parsedMessage != null) {
                    this.mergeFrom(parsedMessage);
                }

            }

            return this;
        }

        public String getGroup() {
            Object ref = this.group_;
            if (!(ref instanceof String)) {
                ByteString bs = (ByteString)ref;
                String s = bs.toStringUtf8();
                this.group_ = s;
                return s;
            } else {
                return (String)ref;
            }
        }

        public ByteString getGroupBytes() {
            Object ref = this.group_;
            if (ref instanceof String) {
                ByteString b = ByteString.copyFromUtf8((String)ref);
                this.group_ = b;
                return b;
            } else {
                return (ByteString)ref;
            }
        }

        public Builder setGroup(String value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                this.group_ = value;
                this.onChanged();
                return this;
            }
        }

        public Builder clearGroup() {
            this.group_ = Log.getDefaultInstance().getGroup();
            this.onChanged();
            return this;
        }

        public Builder setGroupBytes(ByteString value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                Log.checkByteStringIsUtf8(value);
                this.group_ = value;
                this.onChanged();
                return this;
            }
        }

        public String getKey() {
            Object ref = this.key_;
            if (!(ref instanceof String)) {
                ByteString bs = (ByteString)ref;
                String s = bs.toStringUtf8();
                this.key_ = s;
                return s;
            } else {
                return (String)ref;
            }
        }

        public ByteString getKeyBytes() {
            Object ref = this.key_;
            if (ref instanceof String) {
                ByteString b = ByteString.copyFromUtf8((String)ref);
                this.key_ = b;
                return b;
            } else {
                return (ByteString)ref;
            }
        }

        public Builder setKey(String value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                this.key_ = value;
                this.onChanged();
                return this;
            }
        }

        public Builder clearKey() {
            this.key_ = Log.getDefaultInstance().getKey();
            this.onChanged();
            return this;
        }

        public Builder setKeyBytes(ByteString value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                Log.checkByteStringIsUtf8(value);
                this.key_ = value;
                this.onChanged();
                return this;
            }
        }

        public ByteString getData() {
            return this.data_;
        }

        public Builder setData(ByteString value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                this.data_ = value;
                this.onChanged();
                return this;
            }
        }

        public Builder clearData() {
            this.data_ = Log.getDefaultInstance().getData();
            this.onChanged();
            return this;
        }

        public String getType() {
            Object ref = this.type_;
            if (!(ref instanceof String)) {
                ByteString bs = (ByteString)ref;
                String s = bs.toStringUtf8();
                this.type_ = s;
                return s;
            } else {
                return (String)ref;
            }
        }

        public ByteString getTypeBytes() {
            Object ref = this.type_;
            if (ref instanceof String) {
                ByteString b = ByteString.copyFromUtf8((String)ref);
                this.type_ = b;
                return b;
            } else {
                return (ByteString)ref;
            }
        }

        public Builder setType(String value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                this.type_ = value;
                this.onChanged();
                return this;
            }
        }

        public Builder clearType() {
            this.type_ = Log.getDefaultInstance().getType();
            this.onChanged();
            return this;
        }

        public Builder setTypeBytes(ByteString value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                Log.checkByteStringIsUtf8(value);
                this.type_ = value;
                this.onChanged();
                return this;
            }
        }

        public String getOperation() {
            Object ref = this.operation_;
            if (!(ref instanceof String)) {
                ByteString bs = (ByteString)ref;
                String s = bs.toStringUtf8();
                this.operation_ = s;
                return s;
            } else {
                return (String)ref;
            }
        }

        public ByteString getOperationBytes() {
            Object ref = this.operation_;
            if (ref instanceof String) {
                ByteString b = ByteString.copyFromUtf8((String)ref);
                this.operation_ = b;
                return b;
            } else {
                return (ByteString)ref;
            }
        }

        public Builder setOperation(String value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                this.operation_ = value;
                this.onChanged();
                return this;
            }
        }

        public Builder clearOperation() {
            this.operation_ = Log.getDefaultInstance().getOperation();
            this.onChanged();
            return this;
        }

        public Builder setOperationBytes(ByteString value) {
            if (value == null) {
                throw new NullPointerException();
            } else {
                Log.checkByteStringIsUtf8(value);
                this.operation_ = value;
                this.onChanged();
                return this;
            }
        }

        private MapField<String, String> internalGetExtendInfo() {
            return this.extendInfo_ == null ? MapField.emptyMapField(Log.ExtendInfoDefaultEntryHolder.defaultEntry) : this.extendInfo_;
        }

        private MapField<String, String> internalGetMutableExtendInfo() {
            this.onChanged();
            if (this.extendInfo_ == null) {
                this.extendInfo_ = MapField.newMapField(Log.ExtendInfoDefaultEntryHolder.defaultEntry);
            }

            if (!this.extendInfo_.isMutable()) {
                this.extendInfo_ = this.extendInfo_.copy();
            }

            return this.extendInfo_;
        }

        public int getExtendInfoCount() {
            return this.internalGetExtendInfo().getMap().size();
        }

        public boolean containsExtendInfo(String key) {
            if (key == null) {
                throw new NullPointerException();
            } else {
                return this.internalGetExtendInfo().getMap().containsKey(key);
            }
        }

        /** @deprecated */
        @Deprecated
        public Map<String, String> getExtendInfo() {
            return this.getExtendInfoMap();
        }

        public Map<String, String> getExtendInfoMap() {
            return this.internalGetExtendInfo().getMap();
        }

        public String getExtendInfoOrDefault(String key, String defaultValue) {
            if (key == null) {
                throw new NullPointerException();
            } else {
                Map<String, String> map = this.internalGetExtendInfo().getMap();
                return map.containsKey(key) ? (String)map.get(key) : defaultValue;
            }
        }

        public String getExtendInfoOrThrow(String key) {
            if (key == null) {
                throw new NullPointerException();
            } else {
                Map<String, String> map = this.internalGetExtendInfo().getMap();
                if (!map.containsKey(key)) {
                    throw new IllegalArgumentException();
                } else {
                    return (String)map.get(key);
                }
            }
        }

        public Builder clearExtendInfo() {
            this.internalGetMutableExtendInfo().getMutableMap().clear();
            return this;
        }

        public Builder removeExtendInfo(String key) {
            if (key == null) {
                throw new NullPointerException();
            } else {
                this.internalGetMutableExtendInfo().getMutableMap().remove(key);
                return this;
            }
        }

        /** @deprecated */
        @Deprecated
        public Map<String, String> getMutableExtendInfo() {
            return this.internalGetMutableExtendInfo().getMutableMap();
        }

        public Builder putExtendInfo(String key, String value) {
            if (key == null) {
                throw new NullPointerException();
            } else if (value == null) {
                throw new NullPointerException();
            } else {
                this.internalGetMutableExtendInfo().getMutableMap().put(key, value);
                return this;
            }
        }

        public Builder putAllExtendInfo(Map<String, String> values) {
            this.internalGetMutableExtendInfo().getMutableMap().putAll(values);
            return this;
        }

        public final Builder setUnknownFields(UnknownFieldSet unknownFields) {
            return (Builder)super.setUnknownFields(unknownFields);
        }

        public final Builder mergeUnknownFields(UnknownFieldSet unknownFields) {
            return (Builder)super.mergeUnknownFields(unknownFields);
        }
    }

    private static final class ExtendInfoDefaultEntryHolder {
        static final MapEntry<String, String> defaultEntry;

        private ExtendInfoDefaultEntryHolder() {
        }

        static {
            defaultEntry = MapEntry.newDefaultInstance(Data.internal_static_Log_ExtendInfoEntry_descriptor, FieldType.STRING, "", FieldType.STRING, "");
        }
    }
}
